﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace UniRx
{
	// Token: 0x020003A8 RID: 936
	[Serializable]
	public struct Tuple<T1, T2, T3, T4, T5> : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable<Tuple<T1, T2, T3, T4, T5>>
	{
		// Token: 0x06001304 RID: 4868 RVA: 0x000570D7 File Offset: 0x000554D7
		public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
		{
			this.item1 = item1;
			this.item2 = item2;
			this.item3 = item3;
			this.item4 = item4;
			this.item5 = item5;
		}

		// Token: 0x17000137 RID: 311
		// (get) Token: 0x06001305 RID: 4869 RVA: 0x000570FE File Offset: 0x000554FE
		public T1 Item1
		{
			get
			{
				return this.item1;
			}
		}

		// Token: 0x17000138 RID: 312
		// (get) Token: 0x06001306 RID: 4870 RVA: 0x00057106 File Offset: 0x00055506
		public T2 Item2
		{
			get
			{
				return this.item2;
			}
		}

		// Token: 0x17000139 RID: 313
		// (get) Token: 0x06001307 RID: 4871 RVA: 0x0005710E File Offset: 0x0005550E
		public T3 Item3
		{
			get
			{
				return this.item3;
			}
		}

		// Token: 0x1700013A RID: 314
		// (get) Token: 0x06001308 RID: 4872 RVA: 0x00057116 File Offset: 0x00055516
		public T4 Item4
		{
			get
			{
				return this.item4;
			}
		}

		// Token: 0x1700013B RID: 315
		// (get) Token: 0x06001309 RID: 4873 RVA: 0x0005711E File Offset: 0x0005551E
		public T5 Item5
		{
			get
			{
				return this.item5;
			}
		}

		// Token: 0x0600130A RID: 4874 RVA: 0x00057126 File Offset: 0x00055526
		int IComparable.CompareTo(object obj)
		{
			return ((IStructuralComparable)this).CompareTo(obj, Comparer<object>.Default);
		}

		// Token: 0x0600130B RID: 4875 RVA: 0x00057140 File Offset: 0x00055540
		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is Tuple<T1, T2, T3, T4, T5>))
			{
				throw new ArgumentException("other");
			}
			Tuple<T1, T2, T3, T4, T5> tuple = (Tuple<T1, T2, T3, T4, T5>)other;
			int num = comparer.Compare(this.item1, tuple.item1);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(this.item2, tuple.item2);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(this.item3, tuple.item3);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(this.item4, tuple.item4);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(this.item5, tuple.item5);
		}

		// Token: 0x0600130C RID: 4876 RVA: 0x00057227 File Offset: 0x00055627
		public override bool Equals(object obj)
		{
			return ((IStructuralEquatable)this).Equals(obj, EqualityComparer<object>.Default);
		}

		// Token: 0x0600130D RID: 4877 RVA: 0x00057240 File Offset: 0x00055640
		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (!(other is Tuple<T1, T2, T3, T4, T5>))
			{
				return false;
			}
			Tuple<T1, T2, T3, T4, T5> tuple = (Tuple<T1, T2, T3, T4, T5>)other;
			return comparer.Equals(this.item1, tuple.item1) && comparer.Equals(this.item2, tuple.item2) && comparer.Equals(this.item3, tuple.item3) && comparer.Equals(this.item4, tuple.item4) && comparer.Equals(this.item5, tuple.item5);
		}

		// Token: 0x0600130E RID: 4878 RVA: 0x0005730C File Offset: 0x0005570C
		public override int GetHashCode()
		{
			EqualityComparer<T1> @default = EqualityComparer<T1>.Default;
			EqualityComparer<T2> default2 = EqualityComparer<T2>.Default;
			EqualityComparer<T3> default3 = EqualityComparer<T3>.Default;
			EqualityComparer<T4> default4 = EqualityComparer<T4>.Default;
			EqualityComparer<T5> default5 = EqualityComparer<T5>.Default;
			int num = @default.GetHashCode(this.item1);
			num = ((num << 5) + num ^ default2.GetHashCode(this.item2));
			int num2 = default3.GetHashCode(this.item3);
			num2 = ((num2 << 5) + num2 ^ default4.GetHashCode(this.item4));
			num = ((num << 5) + num ^ num2);
			return (num << 5) + num ^ default5.GetHashCode(this.item5);
		}

		// Token: 0x0600130F RID: 4879 RVA: 0x000573A8 File Offset: 0x000557A8
		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			int num = comparer.GetHashCode(this.item1);
			num = ((num << 5) + num ^ comparer.GetHashCode(this.item2));
			int num2 = comparer.GetHashCode(this.item3);
			num2 = ((num2 << 5) + num2 ^ comparer.GetHashCode(this.item4));
			num = ((num << 5) + num ^ num2);
			return (num << 5) + num ^ comparer.GetHashCode(this.item5);
		}

		// Token: 0x06001310 RID: 4880 RVA: 0x0005742C File Offset: 0x0005582C
		string ITuple.ToString()
		{
			return string.Format("{0}, {1}, {2}, {3}, {4}", new object[]
			{
				this.item1,
				this.item2,
				this.item3,
				this.item4,
				this.item5
			});
		}

		// Token: 0x06001311 RID: 4881 RVA: 0x0005748F File Offset: 0x0005588F
		public override string ToString()
		{
			return "(" + ((ITuple)this).ToString() + ")";
		}

		// Token: 0x06001312 RID: 4882 RVA: 0x000574B0 File Offset: 0x000558B0
		public bool Equals(Tuple<T1, T2, T3, T4, T5> other)
		{
			EqualityComparer<T1> @default = EqualityComparer<T1>.Default;
			EqualityComparer<T2> default2 = EqualityComparer<T2>.Default;
			EqualityComparer<T3> default3 = EqualityComparer<T3>.Default;
			EqualityComparer<T4> default4 = EqualityComparer<T4>.Default;
			EqualityComparer<T5> default5 = EqualityComparer<T5>.Default;
			return @default.Equals(this.item1, other.Item1) && default2.Equals(this.item2, other.Item2) && default3.Equals(this.item3, other.Item3) && default4.Equals(this.item4, other.Item4) && default5.Equals(this.item5, other.Item5);
		}

		// Token: 0x04000B52 RID: 2898
		private T1 item1;

		// Token: 0x04000B53 RID: 2899
		private T2 item2;

		// Token: 0x04000B54 RID: 2900
		private T3 item3;

		// Token: 0x04000B55 RID: 2901
		private T4 item4;

		// Token: 0x04000B56 RID: 2902
		private T5 item5;
	}
}
